﻿<form method="post">
    @Html.AntiForgeryToken()
    <br />
    <table cellpadding="0" cellspacing="1" border="0" width="99%" class="formtable">
        <tr>
            <th style="width: 80px;">被催办人员：</th>
            <td>
                @Html.Raw(ViewData["Users"])
            </td>
        </tr>
        <tr>
            <th>催办方式：</th>
            <td>
                <input checked="checked" type="checkbox" style="vertical-align:middle;" value="0" name="Model" id="Model_0" /><label style="vertical-align:middle;" for="Model_0">站内消息</label>
                <input checked="checked" type="checkbox" style="vertical-align:middle;" value="1" name="Model" id="Model_1" /><label style="vertical-align:middle;" for="Model_1">手机短信</label>
                <input checked="checked" type="checkbox" style="vertical-align:middle;" value="2" name="Model" id="Model_2" /><label style="vertical-align:middle;" for="Model_2">微信</label>
            </td>
        </tr>
        <tr>
            <th>催办内容：</th>
            <td>
                <textarea class="mytextarea" id="Contents" name="Contents" validate="empty" style="width:99%; height:100px;">@ViewData["Contents"]</textarea>
            </td>
        </tr>
    </table>
    <div class="buttondiv">
        <input type="button" value="确定催办" class="mybutton" onclick="checkform(this);" />
        <input type="button" class="mybutton" value="关闭窗口" onclick="new RoadUI.Window().close();" />
    </div>
</form>
<script type="text/javascript">
    $(function ()
    {
        @Html.Raw(ViewBag.script)
    });
    function checkform(but) {
        var f = document.forms[0];
        if (new RoadUI.Validate().validateForm(f)) {
            var o = RoadUI.Core.serializeForm($(f));
            $(but).prop("disabled", true);
            $.ajax({
                url: "HastenSave@(Html.Raw(ViewData["queryString"]))", data: o, type: "post", cache:false, success: function (text) {
                    if (RoadUI.Core.checkLogin(text, false)) {
                        alert(text);
                    }
                    $(but).prop("disabled", false);
                    new RoadUI.Window().close();
                }
            });
        }
    }
</script>